<cfset libs = viewState.getValue("libs") />
<cfset roles = viewState.getValue("roles") />
<cfset userid = viewState.getValue("userID") />

<h2>
Library List
</h2>

<cfoutput>
<table width="100%" cellspacing="0" cellpadding="" border="0">
	<thead >
		<tr>
			<th>Name</th>
			<th>Description</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<cfloop query="libs">
		<cfif parent is not 0>
		<tr>
			<td>#name#</td>
			<td>#description#</td>
			<td>
				<a href="#viewState.getValue("mySelf")#showLibEntryForm&libID=#libID#<cfif userID is not''>&userid=#userid#</cfif>">Edit</a>
				&nbsp;|&nbsp;
				<a href="#viewState.getValue("mySelf")#deleteLib&libID=#libID#">Delete</a>
			</td>
		</tr>
		</cfif>
		</cfloop>
		<tfoot>
			<td align="right" colspan="6"><a href="#viewState.getValue("mySelf")#showLibEntryForm">Add Library</a></td>
		</tfoot>
	</tbody>
</table>
</cfoutput>